package com.ding.demo.service;

import org.quartz.Job;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class HelloQuartz implements Job {

      /*  @Autowired
        public  TestService testService;*/

        @Override
        public void execute(JobExecutionContext jobExecutionContext) {
            JobDetail detail = jobExecutionContext.getJobDetail();
            String name = detail.getJobDataMap().getString("name");
            System.out.println("my job name is  " + name + " at " + new Date());
            /*testService.run();*/
        }

}
